#ifndef __SQLITE_H__
#define __SQLITE_H__

#define ENTRY_TABLE	"log_in"
#define INFO_TABLE	"user"


typedef struct query_desc{
	char name[100];
	char no[30];
	char addr[100];
	char level[10];
	char age[10];
	char phone[64];
	char salary[10];

}query_desc_t;



int sqlite_open(const char *pathdir, sqlite3 **ppDb);
int sqlite_create(sqlite3 *ppDb, const char *name);
int do_insert_user(sqlite3 *ppDb, const char *name, const char *password, int privilege);

query_desc_t do_sqlite_query(sqlite3* ppDb,char *name,int level);


int do_insert_user_info(sqlite3 *ppDb,const char *name,int no, char *addr,int age,int level,char *phone,double salary);

// 向数据库中插入一条用户数据
int do_sqlite_del(sqlite3 *ppDb, const char *name);

#endif


